package dbexp.model.db;

import java.io.Serializable;

import dbexp.model.Function;
import dbexp.model.Index;
import dbexp.model.Package;
import dbexp.model.PackageBody;
import dbexp.model.Privilege;
import dbexp.model.Procedure;
import dbexp.model.Role;
import dbexp.model.Schema;
import dbexp.model.Sequence;
import dbexp.model.SourceType;
import dbexp.model.Synonym;
import dbexp.model.Table;
import dbexp.model.User;
import dbexp.model.View;

public final class DbOT implements Serializable {

	/**
	 *
	 */
	private static final long serialVersionUID = 1L;

	public static String getNameOfType(final int t) {
		String typ = "";
		if (t == DbOT.PACKAGES) {
			typ += SourceType.LABEL + "/" + Package.LABEL;
		} else if (t == DbOT.PACKAGESBODY) {
			typ += SourceType.LABEL + "/" + PackageBody.LABEL;
		} else if (t == DbOT.PROCEDURES) {
			typ += SourceType.LABEL + "/" + Procedure.LABEL;
		} else if (t == DbOT.FUNCTIONS) {
			typ += SourceType.LABEL + "/" + Function.LABEL;
		} else if (t == DbOT.ROLES) {
			typ += Role.LABEL;
		} else if (t == DbOT.SEQUENCES) {
			typ += Sequence.LABEL;
		} else if (t == DbOT.SYNONYMS) {
			typ += Synonym.LABEL;
		} else if (t == DbOT.TRIGGERS) {
			typ += SourceType.LABEL + "/trigery";
		} else if (t == DbOT.TABLES) {
			typ += Table.LABEL;
		} else if (t == DbOT.VIEWS) {
			typ += View.LABEL;
		} else if (t == DbOT.COLUMNS) {
			typ += "kolumny";
		} else if (t == DbOT.OBJECT_TYPES) {
			typ += "typy obiektowe";
		} else if (t == DbOT.OPERATIONS) {
			typ += "operacje";
		} else if (t == DbOT.PRIVILEGES) {
			typ += Privilege.LABEL;
		} else if (t == DbOT.ROLES) {
			typ += Role.LABEL;
		} else if (t == DbOT.SCHEMAS) {
			typ += Schema.LABEL;
		} else if (t == DbOT.TABLESPACES) {
			typ += "przestrzenie tabel";
		} else if (t == DbOT.USERS) {
			typ += User.LABEL;
		} else if (t == DbOT.SOURCE_TYPES) {
			typ += SourceType.LABEL;
		} else if (t == DbOT.INDEXES) {
			typ += Index.LABEL;
		} else {
			typ += "";
		}
		return typ;
	}

	public static final int OK = 0x0000; // 0
	public static final int ERRORS = 0x1001; // 4097
	public static final int ERROR = 0x10011; // 65553
	public static final int WARNING = 0x0002; // 2
	public static final int EXCEPTION = 0x0003; // 3
	public static final int NULL = 0x0004; // 4
	public static final int INFORMATION = 0x0005; // 5
	public static final int NONE = 0x9001; // 36865
	public static final int UNKNOWN = 0x9009; // 36873
	public static final int SCHEMA = 0x0011; // 17
	public static final int SCHEMAS = 0x00111; // 273
	public static final int USER = 0x0012; // 18
	public static final int USERS = 0x00121; // 289
	public static final int ROLE = 0x0014; // 20
	public static final int ROLES = 0x00141; // 321
	public static final int SECURITY = 0x0015; // 21
	public static final int SECURITES = 0x00151; // 337
	public static final int TABLE = 0x0020; // 32
	public static final int TABLES = 0x00201; // 513
	public static final int TABLESPACE = 0x0022; // 34
	public static final int TABLESPACES = 0x00221; // 545
	public static final int COLUMN = 0x0023; // 35
	public static final int COLUMNS = 0x00231; // 561
	public static final int TRIGGER = 0x0025; // 37
	public static final int TRIGGERS = 0x00251; // 593
	public static final int SEQUENCE = 0x0026; // 38
	public static final int SEQUENCES = 0x00261; // 609
	public static final int VIEW = 0x0027; // 39
	public static final int VIEWS = 0x00271; // 625
	public static final int PROCEDURE = 0x0030; // 48
	public static final int PROCEDURES = 0x00301; // 769
	public static final int FUNCTION = 0x0031; // 49
	public static final int FUNCTIONS = 0x00311; // 785
	public static final int PACKAGE = 0x0032; // 50
	public static final int PACKAGES = 0x00321; // 801
	public static final int PACKAGEBODY = 0x0033; // 51
	public static final int PACKAGESBODY = 0x00331; // 817
	public static final int OBJECT_TYPE = 0x0040; // 64
	public static final int OBJECT_TYPES = 0x00401; // 1025
	public static final int QUERY = 0x0043; // 67
	public static final int QUERIES = 0x00431; // 1073
	public static final int OPERATION = 0x0044; // 68
	public static final int OPERATIONS = 0x00441; // 1089
	public static final int SYNONYM = 0x0050; // 80
	public static final int SYNONYMS = 0x00501; // 1281
	public static final int SOURCE_TYPES = 0x00601; // 1537
	public static final int SOURCE_TYPE = 0x006011; // 24593
	public static final int PRIVILEGE = 0x006021; // 24609
	public static final int PRIVILEGES = 0x00602; // 1538
	public static final int OBJECT_PRIVILEGE = 0x00603; // 1539
	public static final int OBJECT_PRIVILEGES = 0x006031; // 24625
	public static final int SYSTEM_PRIVILEGE = 0x00604; // 1540
	public static final int SYSTEM_PRIVILEGES = 0x006041; // 24641
	public static final int INDEX = 0x00605; // 1541
	public static final int INDEXES = 0x006051; // 24657

}
